package com.game.message.selfbinary;


import com.game.message.transport.DataBuffer;

/**
 * @author lizhiwei
 * @createAt Feb 18, 2015
 */
public abstract class MessageBean {

    protected Message message = new Message();
    /**
     * 把Request数据结构编码成一个DataBuffer
     */
    public DataBuffer toBodyBuffer() {
        return null;
    }


    /**
     * 把DataBuffer解包构造一个Response对象，getResponse函数必须在调用完decode函数之后才能得到真实的包
     */
    public void fromBodyBuffer(DataBuffer buffer) {
    }

}
